home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Video
/
World of Video.iso
/
gfxprograms
/
3dprograms
/
rayshade-4.0
/
stderrfix
/
stderrfix.c
< prev
Wrap
C/C++ Source or Header
|
1995-02-13
|
476b
|
30 lines
#include <stdio.h>
#ifdef RLE
#include <rle.h>
#endif
static FILE *oldstderr;
static void
restorestderr(void)
{
fclose(stderr);
stderr = oldstderr;
}
int
main(int argc, char **argv, char **env)
{
oldstderr = stderr;
stderr = fopen("*", "w+");
atexit(restorestderr);
#ifdef RLE
/* Stdout is not a constant expression, so we have to assign it to
rle_dflt_hdr.rle_file at run-time.
*/
rle_dflt_hdr.rle_file = stdout;
#endif
return mymain(argc, argv, env);
}